An interactive reference for the CP2102, USB Type-C, dual-core ESP32 board. Click any pin for its functions, boot-time behavior and a MicroPython example. The antenna is at the top and the USB-C port at the bottom.
| Bus | MicroPython default | Example | Notes |
|---|---|---|---|
| I2C(0) | SCL 18, SDA 19 | I2C(0) | Any output pins work: I2C(0, scl=Pin(22), sda=Pin(21)) matches the Arduino convention that most tutorials and modules use. |
| I2C(1) | SCL 25, SDA 26 | I2C(1) | Second hardware I2C bus. |
| SPI(2) — VSPI | SCK 18, MOSI 23, MISO 19 | SPI(2) | Usual CS: GPIO 5. Non-default pins are limited to 40 MHz. |
| SPI(1) — HSPI | SCK 14, MOSI 13, MISO 12 | SPI(1) | Usual CS: GPIO 15. GPIO 12 is a boot strapping pin, so take care. |
| UART0 | TX 1, RX 3 | — | Used by the REPL and USB. Leave it free. |
| UART2 | TX 17, RX 16 | UART(2, 9600) | The best UART for GPS, sensors and other boards. |
| UART1 | TX 10, RX 9 (flash pins) | UART(1, tx=…, rx=…) | Always pass your own pins, e.g. tx=Pin(4), rx=Pin(5). |
Never feed 5 V into a GPIO. Use a level shifter or a voltage divider for 5 V sensors. ADC inputs max out at 3.6 V.
These connect to the module's internal flash. Using them crashes the board. On the 38-pin board they're labeled CLK, SD0–SD3 and CMD.
GPIO 34, 35, 36 (VP) and 39 (VN) can't drive outputs and have no internal pull-ups. They're ideal for analog readings.
GPIO 0, 2, 5, 12 and 15 are read at power-up. GPIO 12 high at boot can stop the board from starting, and GPIO 0 low enters flash mode.
Analog reads on GPIO 0, 2, 4, 12–15 and 25–27 fail while Wi-Fi is active. For analog input in Wi-Fi projects, use the ADC1 pins (32–39).
GPIO 4, 13, 16–19, 21–23, 25–27, 32 and 33 have no boot quirks and work for input, output and PWM.